import Vue from 'vue'
import App from './App.vue'
//引入路由
import router from '@/router'
//引入仓库
import store from '@/store'
//三集联动组件 ---全局主键
//引入mock
import "@/mock/mockServe.js"
import TypeNav from "@/components/TypeNav/index.vue"
import Carousel from "@/components/Carousel/index.vue"
import Pagination from "@/components/Pagination/Pagination.vue"
import {reqCategoryList} from '@/api/index.js'
import "swiper/css/swiper.css"
import {Button,MessageBox} from 'element-ui'
import tu from '@/assets/logo.png'
//统一引入api文件夹里面接口
import * as API  from  '@/api'
//引入插件
import VueLazyload  from 'vue-lazyload'
//注册插件
Vue.use(VueLazyload,{
  loading:tu
})
//第一个参数：全局组件的名字 第二个参数 ：哪个参数
Vue.component(TypeNav.name,TypeNav)
Vue.component(Carousel.name,Carousel)
Vue.component(Pagination.name,Pagination)

Vue.component(Button.name,Button)
Vue.prototype.$msgbox  = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.config.productionTip = false
Vue.prototype.$bus=new Vue() //使用事件总线插件

new Vue({
  beforeCreate(){
    Vue.prototype.$API =API
  },
	//注册路由信息 在这里书写router 的时候  组件身上都拥有着$route $router
	router ,
//注册仓库组件实列的身上会多一个属性$store属性
	store,
	//
  render: h => h(App),
}).$mount('#app') 
